<?php $form=$this->beginWidget('CActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
	'htmlOptions'=>array(
		'class' => 'form',
	),
)); ?>
<fieldset class="grey inline">
  <legend><?php echo CHtml::link('快速搜索','#',array('class'=>'search-button collapse')); ?></legend>
  
    <?php
	$options = array();	
    if(!empty($provinces)){
    	$options = CHtml::listData($provinces,'PROVINCE_ID','PROVINCE_NAME');
    }
	$options[0] = "请选择所在省";
	   
    echo CHtml::dropDownList('MtsysBase[PROVINCE_ID]','', $options,array(
        'ajax' => array(
            'type'=>'POST',
            'url'=> array('getCitys'),
            'update'=>'#CITY_ID',
            'data'=>array('PROVINCE_ID'=>'js:$("#PROVINCE_ID").val()'),
        ),
		'id'=>'PROVINCE_ID',
    ))."&nbsp;";
    
    echo CHtml::dropDownList('MtsysBase[CITY_ID]','', array('0'=>'请选择所在市'), array(
        'ajax' => array(
            'type'=>'POST',
            'url'=> array('getCountys'),
            'update'=>'#COUNTY_ID',
            'data'=>array('CITY_ID'=>'js:$("#CITY_ID").val()'),
        ),
		'id'=>'CITY_ID',
    ))."&nbsp;";
    
    echo CHtml::dropDownList('MtsysBase[COUNTY_ID]','', array('0'=>'请选择所在区'), array(
		'id'=>'COUNTY_ID',
	));
    ?> 
<?php echo $form->label($model,'BASE_N'); ?>
<label><?php echo $form->textField($model,'BASE_N'); ?>
</label>
<?php echo $form->label($model,'GROUPNAME_V'); ?>
<label><?php echo $form->textField($model,'GROUPNAME_V',array('size'=>60,'maxlength'=>255)); ?>
</label>
<?php echo CHtml::submitButton('Search',array('class'=>'button blue small')); ?>
<?php echo CHtml::button('PickData', array('submit' => array('DeviceMonitor/pick')));?>	
<?php echo CHtml::button('GetStatus', array('submit' => array('DeviceMonitor/getstatus')));?>
</fieldset>
<?php $this->endWidget(); ?>
